<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>判断闰年</title>
    <style>
        a{
            color: #c01900;
            text-decoration: none;
        }
    </style>
</head>
<body>
<a href="同页面切换.html">同页面切换</a>
<br/>
<br/>
<script>
    var years=prompt("请输入年份：");
        if( years%4==0&&years%100!=0){
             alert(years+"年是闰年！！！");
        }else if(years%400==0){
             alert(years+"年是闰年！！！");
        }else {
             alert(years+"年是平年！！！");
    }
</script>
</body>
</html>